import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        int []arr=new int[]{1,2,3,4,5,6,7,8,9};
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        binarySearch(arr,n);

    }
    public static void binarySearch(int arr[],int n){
        int left = 0;
        int right = arr.length-1;
        int flag = 0;
        int mid= 0;
        while (left<=right){
            mid =(left+right)/2;
            if(n<arr[mid]){
                right = mid-1;
            }
            else if(n>arr[mid]){
                left = mid+1;
            }
            else {
                System.out.println("找到了下标为"+mid);
                flag = 1;
                break;
            }
        }
        if (flag==0){
            System.out.println("没找到");
        }
    }
}
